let itemType = {
  N4: ["FlowDoneTable", "FlowToDoTable"],
  4: ["notifyDone", "notifyNotDone"]
};
let state = {
  0: ["FlowToDoTable", "notifyNotDone"],
  1: ["FlowDoneTable", "notifyDone"]
};
export const getItemType = (type, status) => {
  let map = status === "itemType" ? itemType : state;
  for (let key in map) {
    if (map[key].includes(type)) {
      return key;
    }
  }
  return "";
};

export const createParams = (type) => {
  let year = new Date().getFullYear();
  let month = new Date().getMonth() + 1;
  let day = new Date().getDate();
  let obj = {
    "itemType": getItemType(type, "itemType"),
    "pageIndex": 1,
    "pageSize": 10,
    "receiveEndTime": `${year}-${month}-${day}`,
    "receiveStartTime": `${year - 1}-${month}-${day}`,
    "state": getItemType(type, "state")
    // "systemId": "JJJTLSSSO"
  };
  return obj;
};